@contact: email-contact;
@popoverBtn: opt-btn;
.@{contact} {
  height: 100%;
  position: relative;
  .wea-input-focus>.ant-input-wrapper {
    background: #FFF;
  }
  &-top {
    &-selectname {
      &.selected {
        >span:first-child {
          max-width: 80%;
        }
        >span:last-child {
          top:-8px;
        }
      }
      >span {
        display: inline-block;
        // float: left;
        &:first-child {
          max-width: 90%;
          overflow: hidden !important;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
        &:last-child {
          position: relative;
          top: -2px;
        }
      }
    }
    &-ops {
      >span {
        cursor: pointer;
        margin-left: 10px;
      }
    }
    &-select {
      position: relative;
      left: -11px;
      width: 135px;
      .ant-select-selection-selected-value{
        white-space: nowrap;
        text-overflow: ellipsis;
        -o-text-overflow: ellipsis;
        overflow: hidden;
      }
    }
    &-options {
      width: 252px;
      overflow-x: hidden;
    }
  }
  &-container {
    position: absolute;
    top: 47px;
    bottom: 0;
    width: 100%;
    overflow: hidden;
    &-check {
      padding: 16px 16px 8px;
      .element {
        >span {
          color: #32A8FF;
          padding: 0 2px;
        }
      }
    }
    &-users {
      position: absolute;
      top: 47px;
      bottom: 65px;
      width: 100%;
      .ant-spin-nested-loading {
        height: 100%;
      }
      &-main {
        padding: 0 8px;
        .user-item {
          width: 11%;
          height: 158px;
          display: inline-block;
          margin: 8px;
          .ant-card-body {
            height: 100%;
            padding: 17px;
          }
          .checkbox {
            text-align: right;
          }
          .content {
            height: 62%;
            overflow: hidden;
            >p {
              width: 100%;
              line-height: 25px;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
              word-break: break-all;
              cursor: pointer;
            }
          }
          .user-group {
            font-size: 12px;
            color: #4D7AD8;
            position: relative;
            line-height: 26px;
            height: 26px;
            text-align: center;
            padding-right: 12px; 
            margin: 0 36px;
            cursor: pointer;
            border: 1px solid transparent;
            &:hover {
              border: 1px solid #e4e4e4;
              border-radius: 5px;
            }
            span:first-child {
              white-space: nowrap;
              text-overflow: ellipsis;
              -o-text-overflow: ellipsis;
              overflow: hidden;
              max-width: 60px;
              display: inline-block;
            }
            .icon-coms-organization-down {
              position: absolute;
              color: #a3a3a3;
              padding-top: 5px;
              font-size: 18px;
              transform: scale(0.5);
              -ms-transform: scale(0.5); /* IE 9 */
              -moz-transform: scale(0.5); /* Firefox */
              -webkit-transform: scale(0.5); /* Safari 和 Chrome */
              -o-transform: scale(0.5);
            }
          }
        }
      }
      &-group {
        .ant-popover-inner {
          .ant-popover-title {
            height: auto;
            width: 400px;
          }
          .ant-popover-inner-content {
            text-align: center;
          }
        }
        &-title {
          width: 100%;
          .groups {
            max-height: 150px;
            overflow-x: hidden;
            overflow-y: auto;
            >div {
              width: 50%;
              float: left;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }
          }
          .new-group {
            display: inline-block;
            border: 1px solid #dadada;
            border-radius: 4px;
            padding: 0 10px;
            margin: 8px 0;
            cursor: pointer;
            .icon-email-New-group {
              display: inline-block;
              font-size: 18px;
              color: #444;
              margin-right: 6px;
              position: relative;
              top: 2px;
            }
          }
          .add-group {
            // overflow: hidden;
            margin: 10px 0;
            &-content {
              width: 57%;
              display: inline-block;
            }
            &-opt {
              display: inline-block;
              >.ant-btn {
                margin-left: 10px;
                margin-top: -3px;
              }
            }
          }
        }
      }
    }
    &-ops {
      position: absolute;
      bottom: 0;
      width: 100%;
      height: 65px;
      border-top: 1px solid #e4e4e4;
      text-align: right;
      line-height: 65px;
      padding-right: 20px;
      .opt-btn {
        margin-right: 10px;
        display: inline-block;
      }
    }
  }

  &-addContact {
    .ant-spin-nested-loading {
      height: 100%;
    }
    &-formGroup-0 {
      .email-form-formItem {
        .ant-col-8 {
          padding-left: 90px;
        }
        .ant-col-16 {
          padding-right: 90px;
        }
      }
    }
    &-formGroup-1 {
      .email-form-formItem {
        .ant-col-8>div {
          padding-left: 90px;
        }
        .ant-col-16 {
          padding-right: 90px;
        }
      }
    }
    &-group {
      border: 1px solid #dadada;
      padding: 11px 0 11px 11px;
      &-item {
        width: 50%;
        display: inline-block;
        padding-bottom: 8px;
        .wea-checkbox {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          width: 100%;
        }
      }
      .new-group {
        display: inline-block;
        border: 1px solid #dadada;
        border-radius: 4px;
        padding: 6px 10px;
        margin: 8px 0;
        cursor: pointer;
        .icon-email-New-group {
          display: inline-block;
          font-size: 18px;
          color: #444;
          margin-right: 6px;
          position: relative;
          top: 2px;
        }
      }
      .add-group {
        margin: 10px 0;
        position: relative;
        &-content {
          width: 128px;
          display: inline-block;
          .ant-input {
            min-height: auto;
            padding: 5px 0;
          }
        }
        &-opt {
          display: inline-block;
          width: 172px;
          float: right;
          padding-right: 2px;
          text-align: center;
          >.ant-btn {
            margin-left: 10px;
          }
        }
      }
    }
  }
}

/* 移动到 && 复制到 Popover */
.@{popoverBtn} {
  &-popover {
    .ant-popover-title, .ant-popover-inner-content {
      height: inherit;
      padding: 0;
    }
  }
  &-moveCopy {
    &-item {
      padding: 3px 10px;
      cursor: pointer;
      &:hover {
        background: #eaf8fe;
        color: #1691ec;
      }
      >div {
        overflow: hidden;
      }
      >div>span {
        float: left;
      }
      .groupname {
        display: inline-block;
        max-width: 190px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden
      }
    }
    &-content {
      text-align: center;
      background: #f4f4f4;
      line-height: 42px;
      height: 42px;
      color: #333;
      cursor: pointer;
      .icon-email-New-group {
        color: #444;
        font-size: 18px;
        margin-right: 5px;
        position: relative;
        top: 7%;
      }
    }
  }
}